Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(just): add mullvad vpn shortcut #114

Closed
wants to merge 2 commits into from
Closed

feat(just): add mullvad vpn shortcut #114

wants to merge 2 commits into from

Conversation

renner0e
Copy link
Contributor

address #105

Is it maybe better to have a separate justfile only intended for VPN install scripts? In the future when we have a couple of VPN providers this file could get very cluttered.

How should we deal with beta/arm versions of VPNs?

@castrojo
Copy link
Member

Yeah perhaps a seperate vpn.just might be prudent?

ARM we'll have to do when we have ARM builds, and no opinion on beta stuff as long as it's organized in the just file, thanks for taking a stab at this!

@gerblesh
Copy link
Contributor

I might hold off on layering inside a justfile from config, and try documenting some of this on a website (Mostly talking about rpm-ostree install path/to/rpm). It's also worth considering that both KDE and GNOME support OpenVPN and (possibly?) WireGuard, and the configs can be imported. Mullvad has instructions on their website, idk about other providers.

@throwaway43
Copy link

throwaway43 commented Sep 17, 2023

It's also worth considering that both KDE and GNOME support OpenVPN and (possibly?) WireGuard, and the configs can be imported. Mullvad has instructions on their website, idk about other providers.

Not sure if it's worth sharing, but ProtonVPN hasn't allowed connecting to WireGuard for the longest time (and probably still hasn't) on their Linux Client. As such, the following lines in my justfile have been utilized as a workaround:

# Setup ProtonVPN from config file in ~/Downloads
setup-vpn: 
    mv $HOME/Downloads/*.conf $HOME/Downloads/ProtonVPN.conf
    sed -i '/^DNS.*/a PostUp  =  iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT && ip6tables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT' $HOME/Downloads/ProtonVPN.conf
    sed -i '/^PostUp.*/a PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show  %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT && ip6tables -D OUTPUT ! -o %i -m mark ! --mark $(wg show  %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT' $HOME/Downloads/ProtonVPN.conf
    sed -i '/^[[:space:]]*$/d' ~/Downloads/ProtonVPN.conf
    sudo cp $HOME/Downloads/ProtonVPN.conf /etc/wireguard/
    sudo nmcli con import type wireguard file /etc/wireguard/ProtonVPN.conf
    rm -f $HOME/Downloads/ProtonVPN.conf

Perhaps the following is worth pointing out:

  • This script assumes that the .conf file has been downloaded from ProtonVPN's website and placed to $HOME/Downloads; one is required to log into ProtonVPN's website in order to download the .conf file*.
  • This only imports a single .conf file.
  • The lines starting with sed try to incorporate a killswitch if the wireguard-tools package is layered. Honestly I don't know how effective is, though it seems that ProtonVPN isn't particularly known for having a great killswitch implementation anyways.

@renner0e
Copy link
Contributor Author

renner0e commented Oct 5, 2023

Accidentally closed #115. Sorry I still have to figure git and GitHub out.
Luckily I had local backups of my changes.

@KyleGospo KyleGospo closed this Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants